<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class AddArtRequset extends FormRequest
{
    /**
     * 验证登录
     */
    public function authorize()
    {
        return true;
    }
    /**
     * 验证
     */
    public function rules()
    {
        return [
            'title'=>'required',
            'desc'=>'required',
            'body'=>'required',
            'pic'=>'required',
        ];
    }
    //提示信息
    public function messages()
    {
        return [
            'title.required'=>'标题一定要写',
            'desc.required'=>'描述不能为空',
            'body.required'=>'内容不能为空',
            'pic.required'=>'图片不能为空',
        ];
    }

}
